"use strict";

const Service = require("egg").Service;
const user = require("../emtity/user");

class UserService extends Service {
  async getUser() {
    const list = await this.app.mysql.get(user.table);
    return list;
  }
  async checkUser(username, password) {
    const record = await this.app.mysql.get(user.table, {
      phone: username,
      password,
    });
    return record;
  }
}

module.exports = UserService;
